package com.longy.gulimall.order.service.impl;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.stereotype.Service;

import java.util.*;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.longy.common.utils.PageUtils;
import com.longy.common.utils.Query;

import com.longy.gulimall.order.dao.OrderItemDao;
import com.longy.gulimall.order.entity.OrderItemEntity;
import com.longy.gulimall.order.service.OrderItemService;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import javax.annotation.Resource;


@Service("orderItemService")
public class OrderItemServiceImpl extends ServiceImpl<OrderItemDao, OrderItemEntity> implements OrderItemService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<OrderItemEntity> page = this.page(
                new Query<OrderItemEntity>().getPage(params),
                new QueryWrapper<OrderItemEntity>()
        );

        return new PageUtils(page);
    }

    @Data
    @AllArgsConstructor
    public static class  vo {
        private String s1;
        private String s2;

    }

    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
        for (Integer o : list) {

            if (o==3){
                break;
            }
            System.out.println(o);
        }
        System.out.println("");
        list.forEach(i ->{
            if (i==3){
                return;
            }
            System.out.println(i);
        });

    }

}